package cn.yuyiling.jelly.kg.mongodb.repository;


import cn.yuyiling.jelly.kg.mongodb.entity.KnowledgePoint;
import org.springframework.data.mongodb.repository.Aggregation;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import java.util.List;


public interface KnowledgePointRepository extends MongoRepository<KnowledgePoint, String> {

    KnowledgePoint findByName(String name);

    @Query("{ 'tags': { $in: ?0 } }")
    List<KnowledgePoint> findByTagsIn(List<String> tags);

}